﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x020000DB RID: 219
	internal class Ext16Header : IExtHeaderDecoder
	{
		// Token: 0x06000334 RID: 820 RVA: 0x0000C2F8 File Offset: 0x0000A6F8
		private Ext16Header()
		{
		}

		// Token: 0x06000335 RID: 821 RVA: 0x0000C300 File Offset: 0x0000A700
		public ExtensionHeader Read(byte[] bytes, int offset, out int readSize)
		{
			uint length = (uint)((ushort)(bytes[offset + 1] << 8) | (ushort)bytes[offset + 2]);
			sbyte typeCode = (sbyte)bytes[offset + 3];
			readSize = 4;
			return new ExtensionHeader(typeCode, length);
		}

		// Token: 0x040000F6 RID: 246
		internal static readonly IExtHeaderDecoder Instance = new Ext16Header();
	}
}
